package chixing.day07.inherited;

public class EqualsDemo {
    public static void main(String[] args) {
    Product p1 = new Product(2,"鼠标",20);
    Product p2 = new Product(2,"鼠标",20);
    // ==比较的是堆内存的地址
        //在实际业务中 比较的应该是对象的属性值
        //需要重写equals方法

        System.out.println(p1.equals(p2));
    }
}
